#!/bin/sh

# check all MX records
cleandig test.dyndns MX

# add mx record
cleannsupdate <<!
server $nameserver $port
zone test.dyndns
update add test.dyndns. 3000 MX 30 host-3.test.dyndns
send
answer
!

# check if record was really added
cleandig test.dyndns MX

# delete the just added record
cleannsupdate <<!
server $nameserver $port
zone test.dyndns
update delete test.dyndns. 3000 MX 30 host-3.test.dyndns
send
answer
!

# check if the record was deleted.
cleandig test.dyndns MX
